package code.bigmama.views;

import java.io.File;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.MediaController;
import android.widget.VideoView;

public class myVideoView extends VideoView
{
	public static final String	DEBUG_TAG	= "myVideoView";
	private Context				mContext	= null;

	public myVideoView(Context context, AttributeSet attrs, int defStyle)
	{
		super(context, attrs, defStyle);
		setContext(context);
	}

	public myVideoView(Context context, AttributeSet attrs)
	{
		super(context, attrs);
		setContext(context);
	}

	public myVideoView(Context context)
	{
		super(context);
		setContext(context);
	}

	private void setContext(Context context)
	{
		mContext = context;
	}

	public void play(String path, String name)
	{
		setVideoPath(path + File.separator + name);
		setMediaController(new MediaController(mContext));
		requestFocus();
	}
}
